﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;

namespace Interscape.TwilioClient.Components
{

    /// <summary>
    /// This PagedList is not currently used in the TwilioAPI. It is only included for future potential use.
    /// </summary>
    public class AccountList : PagedList<Account>
    {
    }

    /// <summary>
    /// The Account resource represents your Twilio Account. 
    /// </summary>
    [Serializable]
    public class Account : BaseFriendlyNameInfo
    {

        #region Constructors

        /// <summary>
        /// Creates a new instance of the Account object.
        /// </summary>
        public Account() : base()
        {
        }

        /// <summary>
        /// Creates a new instance of the Account object.
        /// </summary>
        /// <param name="sid">A 34 character string that uniquely identifies this resource.</param>
        public Account(string sid) : base(sid)
        {
        }

        /// <summary>
        /// Creates a new instance of the Account object.
        /// </summary>
        /// <param name="sid">A 34 character string that uniquely identifies this resource.</param>
        /// <param name="friendlyName">A human readable descriptive text for this resource, up to 64 characters long.</param>
        public Account(string sid, string friendlyName) : base(sid, friendlyName)
        {
        }

        #endregion

        /// <summary>
        /// Integer representing the status of the account. 2 = Active Account, 4 = Suspended Account
        /// </summary>
        [XmlElement]
        [DefaultValue(0)]
        public int Status { get; set; }

        /// <summary>
        /// A human-readable description of the value represented in the Status property.
        /// </summary>
        [XmlElement]
        public string StatusText { get; set; }

        /// <summary>
        /// The "password" for your Twilio API calls.
        /// </summary>
        /// <remarks>This is kind of redundant, as you need to know this to be able to make the call in the first place.</remarks>
        [XmlElement]
        public string AuthToken { get; set; }
    }
}
